#include "iocolored.h"
#include <cstdio>
#include <cstdlib>

#ifndef WIN32
void setforeb(ColorName f)
{
	cout << "\033[1;3" << f << "m";
}
void setfore(ColorName f)
{
	cout << "\033[0;3" << f << "m";
}
#else
#include <windows.h>
void setforeb(ColorName f)
{
    HANDLE hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleTextAttribute(hConsole, f);
}
void setfore(ColorName f)
{
        HANDLE hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleTextAttribute(hConsole, f);
}
#endif
